<?php
/**
 * Controller is the customized base controller class.
 * All controller classes for this application should extend from this base class.
 */
class Controller extends CController {
    public $breadcrumbs = array();
    public $pageKeywords = null;
    public $pageDescription = null;

    public function init() {
        $config = Yii::app()->params['frontend'];
        if (isset($config['site_closing'])) {
            $close = ($config['site_closing']) ? true : false;
        } else {
            $close = false;
        }
        if ($close) return $this->redirect(array('doit/index'));
        Yii::import('ext.YHelper.YApp');
        Yii::import('ext.YHelper.YSEO');
        $this->setPageTitle($config['site_name']);
        $this->pageKeywords = trim($config['default_keywords']);
        $this->pageDescription = trim($config['default_description']);
    }
}